{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Seznam - Predicting the transaction volume\n",
    "\n",
    "Seznam is a Czech company with a scope similar to Google. The purpose of this notebook is to analyze data from Seznam's wallet, predicting the transaction volume.\n",
    "\n",
    "Summary:\n",
    "\n",
    "- Prediction type: __Regression model__\n",
    "- Domain: __E-commerce__\n",
    "- Prediction target: __Transaction volume__ \n",
    "- Population size: __1,462,078__\n",
    "\n",
    "_Author: Dr. Patrick Urbanke_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Background\n",
    "\n",
    "Seznam is a Czech company with a scope similar to Google. The purpose of this notebook is to analyze data from Seznam's wallet, predicting the transaction volume.\n",
    "\n",
    "Since the dataset is in Czech, we will quickly translate the meaning of the main tables:\n",
    "\n",
    "- *dobito*: contains data on prepayments into a wallet\n",
    "- *probehnuto*: contains data on charges from a wallet\n",
    "- *probehnuto_mimo_penezenku*: contains data on charges, from sources other than a wallet\n",
    "\n",
    "The dataset has been downloaded from the [CTU Prague relational learning repository](https://relational.fit.cvut.cz/dataset/Seznam) (Motl and Schulte, 2015).\n",
    "\n",
    "We will benchmark [getML](https://www.getml.com) 's feature learning algorithms against [featuretools](https://www.featuretools.com), an open-source implementation of the propositionalization algorithm, similar to getML's FastProp."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Analysis"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's get started with the analysis and set up your session:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Launched the getML engine. The log output will be stored in /home/patrick/.getML/logs/20220710115508.log.\n",
      "\n",
      "\n",
      "Loading pipelines...\n",
      "[========================================] 100%\n",
      "\n",
      "\n",
      "Connected to project 'seznam'\n"
     ]
    }
   ],
   "source": [
    "import copy\n",
    "import os\n",
    "from urllib import request\n",
    "\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from IPython.display import Image\n",
    "import matplotlib.pyplot as plt\n",
    "plt.style.use('seaborn')\n",
    "%matplotlib inline  \n",
    "\n",
    "import getml\n",
    "\n",
    "getml.engine.launch()\n",
    "getml.set_project('seznam')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. Loading data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.1 Download from source\n",
    "\n",
    "We begin by downloading the data:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Connection(conn_id='default',\n",
       "           dbname='Seznam',\n",
       "           dialect='mysql',\n",
       "           host='relational.fit.cvut.cz',\n",
       "           port=3306)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "conn = getml.database.connect_mariadb(\n",
    "    host=\"relational.fit.cvut.cz\",\n",
    "    dbname=\"Seznam\",\n",
    "    port=3306,\n",
    "    user=\"guest\",\n",
    "    password=\"relational\"\n",
    ")\n",
    "\n",
    "conn"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def load_if_needed(name):\n",
    "    \"\"\"\n",
    "    Loads the data from the relational learning\n",
    "    repository, if the data frame has not already\n",
    "    been loaded.\n",
    "    \"\"\"\n",
    "    if not getml.data.exists(name):\n",
    "        data_frame = getml.DataFrame.from_db(\n",
    "            name=name,\n",
    "            table_name=name,\n",
    "            conn=conn\n",
    "        )\n",
    "        data_frame.save()\n",
    "    else:\n",
    "        data_frame = getml.data.load_data_frame(name)\n",
    "    return data_frame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "dobito = load_if_needed(\"dobito\")\n",
    "probehnuto = load_if_needed(\"probehnuto\")\n",
    "probehnuto_mimo_penezenku = load_if_needed(\"probehnuto_mimo_penezenku\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  table {\n",
       "    font-family: Helvetica, sans-serif;\n",
       "  }\n",
       "\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "  }\n",
       "  .join_key,\n",
       "  .numerical,\n",
       "  .target,\n",
       "  .unused_float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  .char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>  name</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_float\">   client_id</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">month_year_datum_transakce</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">sluzba       </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">kc_dobito    </th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">  role</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_float\">unused_float</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string             </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string</th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">7157857</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">1045.62</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">109700</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">5187.28</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">51508</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">408.20</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9573550</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">521.24</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9774621</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2014-11-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">386.22</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">...</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554341</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">65283</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">7850.00</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554342</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">6091446</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">31400.00</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554343</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">1264806</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2013-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">-8220.52</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554344</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">101103</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">3140.00</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554345</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">8674551</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">6280.00</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    554346 rows x 4 columns<br />\n",
       "    memory usage: 29.59 MB<br />\n",
       "    name: dobito<br />\n",
       "    type: getml_community.DataFrame<br />\n",
       "    url: <a href=\"\" target=\"_blank\"> </a>\n",
       "  </p>\n"
      ],
      "text/plain": [
       "  name      client_id   month_year_datum_transakce   sluzba          kc_dobito    \n",
       "  role   unused_float   unused_string                unused_string   unused_string\n",
       "     0        7157857   2012-10-01                   c               1045.62      \n",
       "     1         109700   2015-10-01                   c               5187.28      \n",
       "     2          51508   2015-08-01                   c               408.20       \n",
       "     3        9573550   2012-10-01                   c               521.24       \n",
       "     4        9774621   2014-11-01                   c               386.22       \n",
       "                  ...   ...                          ...             ...          \n",
       "554341          65283   2012-09-01                   g               7850.00      \n",
       "554342        6091446   2012-08-01                   g               31400.00     \n",
       "554343        1264806   2013-08-01                   g               -8220.52     \n",
       "554344         101103   2012-08-01                   g               3140.00      \n",
       "554345        8674551   2012-08-01                   g               6280.00      \n",
       "\n",
       "\n",
       "554346 rows x 4 columns\n",
       "memory usage: 29.59 MB\n",
       "name: dobito\n",
       "type: getml_community.DataFrame\n",
       "url: "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dobito"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  table {\n",
       "    font-family: Helvetica, sans-serif;\n",
       "  }\n",
       "\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "  }\n",
       "  .join_key,\n",
       "  .numerical,\n",
       "  .target,\n",
       "  .unused_float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  .char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>   name</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_float\">   client_id</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">month_year_datum_transakce</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">sluzba       </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">kc_proklikano</th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">   role</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_float\">unused_float</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string             </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string</th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">109145</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2013-06-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">-31.40</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9804394</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">h</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">37.68</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9803353</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">h</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">725.34</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9801753</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">h</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">194.68</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9800425</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">h</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">1042.48</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">...</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462073</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">98857</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">NULL</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">153.86</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462074</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">95776</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">NULL</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">153.86</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462075</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">98857</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">NULL</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">153.86</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462076</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">90001</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">NULL</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">310.86</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462077</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">946957</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">NULL</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">153.86</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    1462078 rows x 4 columns<br />\n",
       "    memory usage: 77.16 MB<br />\n",
       "    name: probehnuto<br />\n",
       "    type: getml_community.DataFrame<br />\n",
       "    url: <a href=\"\" target=\"_blank\"> </a>\n",
       "  </p>\n"
      ],
      "text/plain": [
       "   name      client_id   month_year_datum_transakce   sluzba          kc_proklikano\n",
       "   role   unused_float   unused_string                unused_string   unused_string\n",
       "      0         109145   2013-06-01                   c               -31.40       \n",
       "      1        9804394   2015-10-01                   h               37.68        \n",
       "      2        9803353   2015-10-01                   h               725.34       \n",
       "      3        9801753   2015-10-01                   h               194.68       \n",
       "      4        9800425   2015-10-01                   h               1042.48      \n",
       "                   ...   ...                          ...             ...          \n",
       "1462073          98857   2015-08-01                   NULL            153.86       \n",
       "1462074          95776   2015-09-01                   NULL            153.86       \n",
       "1462075          98857   2015-09-01                   NULL            153.86       \n",
       "1462076          90001   2015-10-01                   NULL            310.86       \n",
       "1462077         946957   2015-10-01                   NULL            153.86       \n",
       "\n",
       "\n",
       "1462078 rows x 4 columns\n",
       "memory usage: 77.16 MB\n",
       "name: probehnuto\n",
       "type: getml_community.DataFrame\n",
       "url: "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "probehnuto"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  table {\n",
       "    font-family: Helvetica, sans-serif;\n",
       "  }\n",
       "\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "  }\n",
       "  .join_key,\n",
       "  .numerical,\n",
       "  .target,\n",
       "  .unused_float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  .char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>  name</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_float\">   client_id</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">Month/Year   </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">probehla_inzerce_mimo_penezenku</th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">  role</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_float\">unused_float</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string                  </th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">3901</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">3901</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">3901</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">3901</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-11-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">3901</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2012-12-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">...</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599381</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9804086</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599382</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9804238</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599383</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9804782</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599384</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9804810</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599385</th>\n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align unused_float\">\n",
       "              <span class=\"left\">9805032</span\n",
       "              ><span class=\"right\" style=\"width: 0ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    599386 rows x 3 columns<br />\n",
       "    memory usage: 23.38 MB<br />\n",
       "    name: probehnuto_mimo_penezenku<br />\n",
       "    type: getml_community.DataFrame<br />\n",
       "    url: <a href=\"\" target=\"_blank\"> </a>\n",
       "  </p>\n"
      ],
      "text/plain": [
       "  name      client_id   Month/Year      probehla_inzerce_mimo_penezenku\n",
       "  role   unused_float   unused_string   unused_string                  \n",
       "     0           3901   2012-08-01      ANO                            \n",
       "     1           3901   2012-09-01      ANO                            \n",
       "     2           3901   2012-10-01      ANO                            \n",
       "     3           3901   2012-11-01      ANO                            \n",
       "     4           3901   2012-12-01      ANO                            \n",
       "                  ...   ...             ...                            \n",
       "599381        9804086   2015-10-01      ANO                            \n",
       "599382        9804238   2015-10-01      ANO                            \n",
       "599383        9804782   2015-10-01      ANO                            \n",
       "599384        9804810   2015-10-01      ANO                            \n",
       "599385        9805032   2015-10-01      ANO                            \n",
       "\n",
       "\n",
       "599386 rows x 3 columns\n",
       "memory usage: 23.38 MB\n",
       "name: probehnuto_mimo_penezenku\n",
       "type: getml_community.DataFrame\n",
       "url: "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "probehnuto_mimo_penezenku"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.2 Prepare data for getML"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "getML requires that we define *roles* for each of the columns."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  table {\n",
       "    font-family: Helvetica, sans-serif;\n",
       "  }\n",
       "\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "  }\n",
       "  .join_key,\n",
       "  .numerical,\n",
       "  .target,\n",
       "  .unused_float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  .char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>  name</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"time_stamp\"> month_year_datum_transakce</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"join_key\">client_id</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"categorical\">sluzba     </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"numerical\">kc_dobito</th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">  role</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header time_stamp\">                 time_stamp</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header join_key\"> join_key</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header categorical\">categorical</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header numerical\">numerical</th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">  unit</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header time_stamp\">time stamp, comparison only</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header join_key\">         </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header categorical\">service    </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header numerical\">         </th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">7157857</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">1045</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.62</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">109700</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">5187</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.28</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">51508</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">408</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.2</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9573550</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">521</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.24</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2014-11-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9774621</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">c</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">386</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.22</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">...</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554341</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">65283</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">7850</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554342</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">6091446</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">31400</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554343</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2013-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">1264806</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">-8220</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.52</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554344</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">101103</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">3140</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>554345</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">8674551</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">g</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align numerical\">\n",
       "              <span class=\"left\">6280</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    554346 rows x 4 columns<br />\n",
       "    memory usage: 13.30 MB<br />\n",
       "    name: dobito<br />\n",
       "    type: getml_community.DataFrame<br />\n",
       "    url: <a href=\"\" target=\"_blank\"> </a>\n",
       "  </p>\n"
      ],
      "text/plain": [
       "  name    month_year_datum_transakce   client_id   sluzba        kc_dobito\n",
       "  role                    time_stamp    join_key   categorical   numerical\n",
       "  unit   time stamp, comparison only               service                \n",
       "     0                    2012-10-01     7157857   c               1045.62\n",
       "     1                    2015-10-01      109700   c               5187.28\n",
       "     2                    2015-08-01       51508   c                408.2 \n",
       "     3                    2012-10-01     9573550   c                521.24\n",
       "     4                    2014-11-01     9774621   c                386.22\n",
       "                                 ...         ...   ...               ...  \n",
       "554341                    2012-09-01       65283   g               7850   \n",
       "554342                    2012-08-01     6091446   g              31400   \n",
       "554343                    2013-08-01     1264806   g              -8220.52\n",
       "554344                    2012-08-01      101103   g               3140   \n",
       "554345                    2012-08-01     8674551   g               6280   \n",
       "\n",
       "\n",
       "554346 rows x 4 columns\n",
       "memory usage: 13.30 MB\n",
       "name: dobito\n",
       "type: getml_community.DataFrame\n",
       "url: "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dobito.set_role(\"client_id\", getml.data.roles.join_key)\n",
    "dobito.set_role(\"month_year_datum_transakce\", getml.data.roles.time_stamp)\n",
    "dobito.set_role(\"sluzba\", getml.data.roles.categorical)\n",
    "dobito.set_role(\"kc_dobito\", getml.data.roles.numerical)\n",
    "\n",
    "dobito.set_unit(\"sluzba\", \"service\")\n",
    "\n",
    "dobito"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  table {\n",
       "    font-family: Helvetica, sans-serif;\n",
       "  }\n",
       "\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "  }\n",
       "  .join_key,\n",
       "  .numerical,\n",
       "  .target,\n",
       "  .unused_float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  .char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>   name</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"time_stamp\"> month_year_datum_transakce</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"join_key\">client_id</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"target\">kc_proklikano</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"categorical\">sluzba     </th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">   role</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header time_stamp\">                 time_stamp</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header join_key\"> join_key</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header target\">       target</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header categorical\">categorical</th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">   unit</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header time_stamp\">time stamp, comparison only</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header join_key\">         </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header target\">             </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header categorical\">service    </th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2013-06-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">109145</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">-31</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.4</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">c</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9804394</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">37</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.68</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">h</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9803353</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">725</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.34</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">h</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9801753</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">194</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.68</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">h</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9800425</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">1042</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.48</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">h</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "          \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">...</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >&nbsp;</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">...</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462073</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">98857</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">153</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.86</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">NULL</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462074</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">95776</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">153</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.86</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">NULL</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462075</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">98857</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">153</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.86</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">NULL</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462076</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">90001</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">310</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.86</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">NULL</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1462077</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">946957</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            \n",
       "              \n",
       "              \n",
       "            \n",
       "            <td class=\"char-align target\">\n",
       "              <span class=\"left\">153</span\n",
       "              ><span class=\"right\" style=\"width: 2ch\"\n",
       "                >.86</span\n",
       "              >\n",
       "            </td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"categorical\">NULL</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    1462078 rows x 4 columns<br />\n",
       "    memory usage: 35.09 MB<br />\n",
       "    name: probehnuto<br />\n",
       "    type: getml_community.DataFrame<br />\n",
       "    url: <a href=\"\" target=\"_blank\"> </a>\n",
       "  </p>\n"
      ],
      "text/plain": [
       "   name    month_year_datum_transakce   client_id   kc_proklikano   sluzba     \n",
       "   role                    time_stamp    join_key          target   categorical\n",
       "   unit   time stamp, comparison only                               service    \n",
       "      0                    2013-06-01      109145          -31.4    c          \n",
       "      1                    2015-10-01     9804394           37.68   h          \n",
       "      2                    2015-10-01     9803353          725.34   h          \n",
       "      3                    2015-10-01     9801753          194.68   h          \n",
       "      4                    2015-10-01     9800425         1042.48   h          \n",
       "                                  ...         ...           ...     ...        \n",
       "1462073                    2015-08-01       98857          153.86   NULL       \n",
       "1462074                    2015-09-01       95776          153.86   NULL       \n",
       "1462075                    2015-09-01       98857          153.86   NULL       \n",
       "1462076                    2015-10-01       90001          310.86   NULL       \n",
       "1462077                    2015-10-01      946957          153.86   NULL       \n",
       "\n",
       "\n",
       "1462078 rows x 4 columns\n",
       "memory usage: 35.09 MB\n",
       "name: probehnuto\n",
       "type: getml_community.DataFrame\n",
       "url: "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "probehnuto.set_role(\"client_id\", getml.data.roles.join_key)\n",
    "probehnuto.set_role(\"month_year_datum_transakce\", getml.data.roles.time_stamp)\n",
    "probehnuto.set_role(\"sluzba\", getml.data.roles.categorical)\n",
    "probehnuto.set_role(\"kc_proklikano\", getml.data.roles.target)\n",
    "\n",
    "probehnuto.set_unit(\"sluzba\", \"service\")\n",
    "\n",
    "probehnuto"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  table {\n",
       "    font-family: Helvetica, sans-serif;\n",
       "  }\n",
       "\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "  }\n",
       "  .join_key,\n",
       "  .numerical,\n",
       "  .target,\n",
       "  .unused_float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  .char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>  name</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"time_stamp\">                 Month/Year</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"join_key\">client_id</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"unused_string\">probehla_inzerce_mimo_penezenku</th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">  role</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header time_stamp\">                 time_stamp</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header join_key\"> join_key</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">unused_string                  </th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header\">  unit</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header time_stamp\">time stamp, comparison only</th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header join_key\">         </th>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <th class=\"sub-header unused_string\">                               </th>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-08-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">3901</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-09-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">3901</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">3901</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-11-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">3901</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2012-12-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">3901</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">...</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">...</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599381</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9804086</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599382</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9804238</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599383</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9804782</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599384</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9804810</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>599385</th>\n",
       "        \n",
       "          \n",
       "            <td class=\"time_stamp\">2015-10-01</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"join_key\">9805032</td>\n",
       "          \n",
       "        \n",
       "          \n",
       "            <td class=\"unused_string\">ANO</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    599386 rows x 3 columns<br />\n",
       "    memory usage: 14.39 MB<br />\n",
       "    name: probehnuto_mimo_penezenku<br />\n",
       "    type: getml_community.DataFrame<br />\n",
       "    url: <a href=\"\" target=\"_blank\"> </a>\n",
       "  </p>\n"
      ],
      "text/plain": [
       "  name                    Month/Year   client_id   probehla_inzerce_mimo_penezenku\n",
       "  role                    time_stamp    join_key   unused_string                  \n",
       "  unit   time stamp, comparison only                                              \n",
       "     0                    2012-08-01        3901   ANO                            \n",
       "     1                    2012-09-01        3901   ANO                            \n",
       "     2                    2012-10-01        3901   ANO                            \n",
       "     3                    2012-11-01        3901   ANO                            \n",
       "     4                    2012-12-01        3901   ANO                            \n",
       "                                 ...         ...   ...                            \n",
       "599381                    2015-10-01     9804086   ANO                            \n",
       "599382                    2015-10-01     9804238   ANO                            \n",
       "599383                    2015-10-01     9804782   ANO                            \n",
       "599384                    2015-10-01     9804810   ANO                            \n",
       "599385                    2015-10-01     9805032   ANO                            \n",
       "\n",
       "\n",
       "599386 rows x 3 columns\n",
       "memory usage: 14.39 MB\n",
       "name: probehnuto_mimo_penezenku\n",
       "type: getml_community.DataFrame\n",
       "url: "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "probehnuto_mimo_penezenku.set_role(\"client_id\", getml.data.roles.join_key)\n",
    "probehnuto_mimo_penezenku.set_role(\"Month/Year\", getml.data.roles.time_stamp)\n",
    "\n",
    "probehnuto_mimo_penezenku"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th.sub-header {\n",
       "    font-weight: normal;\n",
       "    font-style: italic;\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right !important;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.numerical {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.numerical {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "\n",
       "  td.char-align {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  span.left {\n",
       "    text-align: right;\n",
       "    width: 3em;\n",
       "  }\n",
       "  span.right {\n",
       "    float: right;\n",
       "    text-align: left;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th>  </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th>     </th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "        \n",
       "          \n",
       "            <td>train</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "        \n",
       "          \n",
       "            <td>train</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "        \n",
       "          \n",
       "            <td>train</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "        \n",
       "          \n",
       "            <td>test</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>4</th>\n",
       "        \n",
       "          \n",
       "            <td>train</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th></th>\n",
       "        \n",
       "          \n",
       "            <td>...</td>\n",
       "          \n",
       "        \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "\n",
       "  <p>\n",
       "    infinite number of  rows<br />\n",
       "    \n",
       "    type: StringColumnView<br />\n",
       "    \n",
       "  </p>\n"
      ],
      "text/plain": [
       "          \n",
       " 0   train\n",
       " 1   train\n",
       " 2   train\n",
       " 3   test \n",
       " 4   train\n",
       "     ...  \n",
       "\n",
       "\n",
       "infinite number of  rows\n",
       "type: StringColumnView"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "split = getml.data.split.random(train=0.8, test=0.2)\n",
    "split"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. Predictive modeling\n",
    "\n",
    "We loaded the data and defined the roles and units. Next, we create a getML pipeline for relational learning."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.1 Define relational model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<h2>data model</h2>\n",
       "            <div style='margin-top: 15px;'><h4>diagram</h4><br>\n",
       "            <div style=\"height:320px;width:660px;position:relative;\"><svg height=\"310\" width=\"650\"><rect y=\"0\" x=\"0\" rx=\"10\" ry=\"10\" width=\"150\" height=\"90\" style=\"fill:#6829c2;stroke-width:0;\" /><text y=\"73.8\" x=\"75.0\" dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\">probehnuto</text><rect x=\"51\" y=\"10\" rx=\"4\" ry=\"4\" width=\"48\" height=\"48\" style=\" fill:#6829c2;stroke:#ffffff;stroke-width:3;\" /><line x1=\"67.0\" y1=\"10\" x2=\"67.0\" y2=\"58\" style=\"stroke:white;stroke-width:3\" /><line x1=\"83.0\" y1=\"10\" x2=\"83.0\" y2=\"58\" style=\"stroke:white;stroke-width:3\" /><line x1=\"51\" y1=\"26.0\" x2=\"99\" y2=\"26.0\" style=\"stroke:white;stroke-width:3\" /><line x1=\"51\" y1=\"42.0\" x2=\"99\" y2=\"42.0\" style=\"stroke:white;stroke-width:3\" /><rect y=\"110\" x=\"0\" rx=\"10\" ry=\"10\" width=\"150\" height=\"90\" style=\"fill:#6829c2;stroke-width:0;\" /><text y=\"183.8\" x=\"75.0\" dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\">dobito</text><rect x=\"51\" y=\"120\" rx=\"4\" ry=\"4\" width=\"48\" height=\"48\" style=\" fill:#6829c2;stroke:#ffffff;stroke-width:3;\" /><line x1=\"67.0\" y1=\"120\" x2=\"67.0\" y2=\"168\" style=\"stroke:white;stroke-width:3\" /><line x1=\"83.0\" y1=\"120\" x2=\"83.0\" y2=\"168\" style=\"stroke:white;stroke-width:3\" /><line x1=\"51\" y1=\"136.0\" x2=\"99\" y2=\"136.0\" style=\"stroke:white;stroke-width:3\" /><line x1=\"51\" y1=\"152.0\" x2=\"99\" y2=\"152.0\" style=\"stroke:white;stroke-width:3\" /><rect y=\"220\" x=\"0\" rx=\"10\" ry=\"10\" width=\"150\" height=\"90\" style=\"fill:#6829c2;stroke-width:0;\" /><text y=\"293.8\" x=\"75.0\" dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\">probehnuto_mimo_penezenku</text><rect x=\"51\" y=\"230\" rx=\"4\" ry=\"4\" width=\"48\" height=\"48\" style=\" fill:#6829c2;stroke:#ffffff;stroke-width:3;\" /><line x1=\"67.0\" y1=\"230\" x2=\"67.0\" y2=\"278\" style=\"stroke:white;stroke-width:3\" /><line x1=\"83.0\" y1=\"230\" x2=\"83.0\" y2=\"278\" style=\"stroke:white;stroke-width:3\" /><line x1=\"51\" y1=\"246.0\" x2=\"99\" y2=\"246.0\" style=\"stroke:white;stroke-width:3\" /><line x1=\"51\" y1=\"262.0\" x2=\"99\" y2=\"262.0\" style=\"stroke:white;stroke-width:3\" /><rect y=\"220\" x=\"500\" rx=\"10\" ry=\"10\" width=\"150\" height=\"90\" style=\"fill:#6829c2;stroke-width:0;\" /><text y=\"293.8\" x=\"575.0\" dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\">population</text><rect x=\"551\" y=\"230\" rx=\"4\" ry=\"4\" width=\"48\" height=\"48\" style=\" fill:#6829c2;stroke:#ffffff;stroke-width:3;\" /><line x1=\"567.0\" y1=\"230\" x2=\"567.0\" y2=\"278\" style=\"stroke:white;stroke-width:3\" /><line x1=\"583.0\" y1=\"230\" x2=\"583.0\" y2=\"278\" style=\"stroke:white;stroke-width:3\" /><line x1=\"551\" y1=\"246.0\" x2=\"599\" y2=\"246.0\" style=\"stroke:white;stroke-width:3\" /><line x1=\"551\" y1=\"262.0\" x2=\"599\" y2=\"262.0\" style=\"stroke:white;stroke-width:3\" /><line x1=\"150\" y1=\"43.0\" x2=\"573.0\" y2=\"43.0\" style=\"stroke:#808080;;stroke-width:4\" /><line x1=\"573.0\" y1=\"41.0\" x2=\"573.0\" y2=\"210\" style=\"stroke:#808080;;stroke-width:4\" /><polygon points=\"573.0, 220 567.0, 210 579.0, 210 \" style=\"fill:#808080;;stroke-width:0;\" /><rect y=\"10.0\" x=\"249.0\" rx=\"10\" ry=\"10\" width=\"150\" height=\"70\" style=\"fill:#6829c2;stroke-width:0;\" /><text dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\"><tspan y=\"30.0\" x=\"324.0\" font-size=\"7pt\" >client_id = client_id</tspan><tspan y=\"40.0\" x=\"324.0\" font-size=\"7pt\" >month_year_datum_transakce &lt;= month_year_datum_transakce</tspan><tspan y=\"50.0\" x=\"324.0\" font-size=\"7pt\" >Horizon: 1.0 days</tspan><tspan y=\"60.0\" x=\"324.0\" font-size=\"7pt\" >Lagged targets allowed</tspan></text><line x1=\"150\" y1=\"153.0\" x2=\"573.0\" y2=\"153.0\" style=\"stroke:#808080;;stroke-width:4\" /><line x1=\"573.0\" y1=\"151.0\" x2=\"573.0\" y2=\"210\" style=\"stroke:#808080;;stroke-width:4\" /><polygon points=\"573.0, 220 567.0, 210 579.0, 210 \" style=\"fill:#808080;;stroke-width:0;\" /><rect y=\"120.0\" x=\"249.0\" rx=\"10\" ry=\"10\" width=\"150\" height=\"70\" style=\"fill:#6829c2;stroke-width:0;\" /><text dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\"><tspan y=\"150.0\" x=\"324.0\" font-size=\"7pt\" >client_id = client_id</tspan><tspan y=\"160.0\" x=\"324.0\" font-size=\"7pt\" >month_year_datum_transakce &lt;= month_year_datum_transakce</tspan></text><line x1=\"150\" y1=\"263.0\" x2=\"490\" y2=\"263.0\" style=\"stroke:#808080;;stroke-width:4\" /><polygon points=\"500, 263.0 490, 257.0 490, 269.0 \" style=\"fill:#808080;;stroke-width:0;\" /><rect y=\"230.0\" x=\"249.0\" rx=\"10\" ry=\"10\" width=\"150\" height=\"70\" style=\"fill:#6829c2;stroke-width:0;\" /><text dominant-baseline=\"middle\" text-anchor=\"middle\" fill=\"white\"><tspan y=\"260.0\" x=\"324.0\" font-size=\"7pt\" >client_id = client_id</tspan><tspan y=\"270.0\" x=\"324.0\" font-size=\"7pt\" >Month/Year &lt;= month_year_datum_transakce</tspan></text></svg></div>\n",
       "            </div>\n",
       "\n",
       "            <div style='margin-top: 15px;'><h4>staging</h4>\n",
       "            <style>\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  th.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th class=\"int\"> </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">data frames              </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">staging table                   </th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">population</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">POPULATION__STAGING_TABLE_1</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">dobito</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">DOBITO__STAGING_TABLE_2</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">probehnuto</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">PROBEHNUTO__STAGING_TABLE_3</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>3</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">probehnuto_mimo_penezenku</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">PROBEHNUTO_MIMO_PENEZENKU__STAGING_TABLE_4</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "            </div>\n",
       "            \n",
       "<h2>container</h2>\n",
       "<div style='float: left; margin-right: 50px;'>\n",
       "    <h4>population</h4>\n",
       "    <style>\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  th.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th class=\"int\"> </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">subset</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">name      </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"int\">   rows</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">type</th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">test</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">probehnuto</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"int\">292833</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">View</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">train</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">probehnuto</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"int\">1169245</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">View</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "</div>\n",
       "<div style='float: left;'>\n",
       "    <h4>peripheral</h4>\n",
       "    <style>\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  th.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th class=\"int\"> </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">name                     </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"int\">   rows</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">type     </th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">probehnuto</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"int\">1462078</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">DataFrame</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">dobito</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"int\">554346</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">DataFrame</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>2</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"str\">probehnuto_mimo_penezenku</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"int\">599386</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">DataFrame</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "data model\n",
       "\n",
       "  population:\n",
       "    columns:\n",
       "    - sluzba: categorical\n",
       "    - client_id: join_key\n",
       "    - kc_proklikano: target\n",
       "    - month_year_datum_transakce: time_stamp\n",
       "\n",
       "    joins:\n",
       "    - right: 'probehnuto'\n",
       "      on: (population.client_id, probehnuto.client_id)\n",
       "      time_stamps: (population.month_year_datum_transakce, probehnuto.month_year_datum_transakce)\n",
       "      relationship: 'many-to-many'\n",
       "      horizon: 86400.0\n",
       "      lagged_targets: True\n",
       "    - right: 'dobito'\n",
       "      on: (population.client_id, dobito.client_id)\n",
       "      time_stamps: (population.month_year_datum_transakce, dobito.month_year_datum_transakce)\n",
       "      relationship: 'many-to-many'\n",
       "      lagged_targets: False\n",
       "    - right: 'probehnuto_mimo_penezenku'\n",
       "      on: (population.client_id, probehnuto_mimo_penezenku.client_id)\n",
       "      time_stamps: (population.month_year_datum_transakce, probehnuto_mimo_penezenku.Month/Year)\n",
       "      relationship: 'many-to-many'\n",
       "      lagged_targets: False\n",
       "\n",
       "  probehnuto:\n",
       "    columns:\n",
       "    - sluzba: categorical\n",
       "    - client_id: join_key\n",
       "    - kc_proklikano: target\n",
       "    - month_year_datum_transakce: time_stamp\n",
       "\n",
       "  dobito:\n",
       "    columns:\n",
       "    - sluzba: categorical\n",
       "    - client_id: join_key\n",
       "    - kc_dobito: numerical\n",
       "    - month_year_datum_transakce: time_stamp\n",
       "\n",
       "  probehnuto_mimo_penezenku:\n",
       "    columns:\n",
       "    - client_id: join_key\n",
       "    - Month/Year: time_stamp\n",
       "    - probehla_inzerce_mimo_penezenku: unused_string\n",
       "\n",
       "\n",
       "container\n",
       "\n",
       "  population\n",
       "      subset   name            rows   type\n",
       "  0   test     probehnuto    292833   View\n",
       "  1   train    probehnuto   1169245   View\n",
       "\n",
       "  peripheral\n",
       "      name                           rows   type     \n",
       "  0   probehnuto                  1462078   DataFrame\n",
       "  1   dobito                       554346   DataFrame\n",
       "  2   probehnuto_mimo_penezenku    599386   DataFrame"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "star_schema = getml.data.StarSchema(population=probehnuto, alias=\"population\", split=split)\n",
    "\n",
    "star_schema.join(\n",
    "    probehnuto,\n",
    "    on=\"client_id\",\n",
    "    time_stamps=\"month_year_datum_transakce\",\n",
    "    lagged_targets=True,\n",
    "    horizon=getml.data.time.days(1),\n",
    ")\n",
    "\n",
    "star_schema.join(\n",
    "    dobito,\n",
    "    on=\"client_id\",\n",
    "    time_stamps=\"month_year_datum_transakce\",\n",
    ")\n",
    "\n",
    "star_schema.join(\n",
    "    probehnuto_mimo_penezenku,\n",
    "    on=\"client_id\", \n",
    "    time_stamps=(\"month_year_datum_transakce\",  \"Month/Year\"),\n",
    ")\n",
    "\n",
    "star_schema"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.2 getML pipeline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!-- #### 2.1.1  -->\n",
    "__Set-up the feature learner & predictor__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "fast_prop = getml.feature_learning.FastProp(\n",
    "    aggregation=getml.feature_learning.FastProp.agg_sets.All,\n",
    "    loss_function=getml.feature_learning.loss_functions.SquareLoss,\n",
    "    num_threads=1,    \n",
    "    sampling_factor=0.1,\n",
    ")\n",
    "\n",
    "feature_selector = getml.predictors.XGBoostRegressor(n_jobs=1, external_memory=True)\n",
    "\n",
    "predictor = getml.predictors.XGBoostRegressor(n_jobs=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "__Build the pipeline__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre>Pipeline(data_model='population',\n",
       "         feature_learners=['FastProp'],\n",
       "         feature_selectors=['XGBoostRegressor'],\n",
       "         include_categorical=True,\n",
       "         loss_function='SquareLoss',\n",
       "         peripheral=['dobito', 'probehnuto', 'probehnuto_mimo_penezenku'],\n",
       "         predictors=['XGBoostRegressor'],\n",
       "         preprocessors=[],\n",
       "         share_selected_features=0.5,\n",
       "         tags=['fast_prop'])</pre>"
      ],
      "text/plain": [
       "Pipeline(data_model='population',\n",
       "         feature_learners=['FastProp'],\n",
       "         feature_selectors=['XGBoostRegressor'],\n",
       "         include_categorical=True,\n",
       "         loss_function='SquareLoss',\n",
       "         peripheral=['dobito', 'probehnuto', 'probehnuto_mimo_penezenku'],\n",
       "         predictors=['XGBoostRegressor'],\n",
       "         preprocessors=[],\n",
       "         share_selected_features=0.5,\n",
       "         tags=['fast_prop'])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pipe1 = getml.Pipeline(\n",
    "    tags=['fast_prop'],\n",
    "    data_model=star_schema.data_model,\n",
    "    feature_learners=[fast_prop],\n",
    "    feature_selectors=[feature_selector],\n",
    "    predictors=[predictor],\n",
    "    include_categorical=True,\n",
    ")\n",
    "\n",
    "pipe1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.3 Model training"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Checking data model...\n",
      "\n",
      "\n",
      "Staging...\n",
      "[========================================] 100%\n",
      "\n",
      "Checking...\n",
      "[========================================] 100%\n",
      "\n",
      "\n",
      "INFO [FOREIGN KEYS NOT FOUND]: When joining POPULATION__STAGING_TABLE_1 and DOBITO__STAGING_TABLE_2 over 'client_id' and 'client_id', there are no corresponding entries for 2.228789% of entries in 'client_id' in 'POPULATION__STAGING_TABLE_1'. You might want to double-check your join keys.\n",
      "INFO [FOREIGN KEYS NOT FOUND]: When joining POPULATION__STAGING_TABLE_1 and PROBEHNUTO_MIMO_PENEZENKU__STAGING_TABLE_4 over 'client_id' and 'client_id', there are no corresponding entries for 26.543966% of entries in 'client_id' in 'POPULATION__STAGING_TABLE_1'. You might want to double-check your join keys.\n"
     ]
    }
   ],
   "source": [
    "pipe1.check(star_schema.train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Checking data model...\n",
      "\n",
      "\n",
      "Staging...\n",
      "[========================================] 100%\n",
      "\n",
      "\n",
      "INFO [FOREIGN KEYS NOT FOUND]: When joining POPULATION__STAGING_TABLE_1 and DOBITO__STAGING_TABLE_2 over 'client_id' and 'client_id', there are no corresponding entries for 2.228789% of entries in 'client_id' in 'POPULATION__STAGING_TABLE_1'. You might want to double-check your join keys.\n",
      "INFO [FOREIGN KEYS NOT FOUND]: When joining POPULATION__STAGING_TABLE_1 and PROBEHNUTO_MIMO_PENEZENKU__STAGING_TABLE_4 over 'client_id' and 'client_id', there are no corresponding entries for 26.543966% of entries in 'client_id' in 'POPULATION__STAGING_TABLE_1'. You might want to double-check your join keys.\n",
      "\n",
      "\n",
      "Staging...\n",
      "[========================================] 100%\n",
      "\n",
      "FastProp: Trying 631 features...\n",
      "[========================================] 100%\n",
      "\n",
      "FastProp: Building features...\n",
      "[========================================] 100%\n",
      "\n",
      "XGBoost: Training as feature selector...\n",
      "[========================================] 100%\n",
      "\n",
      "XGBoost: Training as predictor...\n",
      "[========================================] 100%\n",
      "\n",
      "\n",
      "Trained pipeline.\n",
      "Time taken: 0h:33m:37.589595\n",
      "\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<pre>Pipeline(data_model='population',\n",
       "         feature_learners=['FastProp'],\n",
       "         feature_selectors=['XGBoostRegressor'],\n",
       "         include_categorical=True,\n",
       "         loss_function='SquareLoss',\n",
       "         peripheral=['dobito', 'probehnuto', 'probehnuto_mimo_penezenku'],\n",
       "         predictors=['XGBoostRegressor'],\n",
       "         preprocessors=[],\n",
       "         share_selected_features=0.5,\n",
       "         tags=['fast_prop', 'container-pkTrpA'])</pre>"
      ],
      "text/plain": [
       "Pipeline(data_model='population',\n",
       "         feature_learners=['FastProp'],\n",
       "         feature_selectors=['XGBoostRegressor'],\n",
       "         include_categorical=True,\n",
       "         loss_function='SquareLoss',\n",
       "         peripheral=['dobito', 'probehnuto', 'probehnuto_mimo_penezenku'],\n",
       "         predictors=['XGBoostRegressor'],\n",
       "         preprocessors=[],\n",
       "         share_selected_features=0.5,\n",
       "         tags=['fast_prop', 'container-pkTrpA'])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pipe1.fit(star_schema.train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.4 Model evaluation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "Staging...\n",
      "[========================================] 100%\n",
      "\n",
      "Preprocessing...\n",
      "[========================================] 100%\n",
      "\n",
      "FastProp: Building features...\n",
      "[========================================] 100%\n",
      "\n",
      "\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<style>\n",
       "  th {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  td {\n",
       "    text-align: left !important;\n",
       "  }\n",
       "  th:nth-child(1) {\n",
       "    text-align: right;\n",
       "    border-right: 1px solid LightGray;\n",
       "  }\n",
       "  th.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.float {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  th.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "  td.int {\n",
       "    text-align: right !important;\n",
       "  }\n",
       "</style>\n",
       "\n",
       "<table class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      \n",
       "        \n",
       "          <th class=\"int\"> </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"datetime\">date time          </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">set used</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"str\">target       </th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"float\">       mae</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"float\">       rmse</th>\n",
       "        \n",
       "      \n",
       "        \n",
       "          <th class=\"float\">rsquared</th>\n",
       "        \n",
       "      \n",
       "    </tr>\n",
       "    \n",
       "  </thead>\n",
       "  <tbody>\n",
       "    \n",
       "      <tr>\n",
       "        <th>0</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"datetime\">2022-07-10 12:29:15</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">train</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">kc_proklikano</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"float\">2973.985</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"float\">14783.8322</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"float\">0.9394</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "      <tr>\n",
       "        <th>1</th>\n",
       "          \n",
       "            \n",
       "              <td class=\"datetime\">2022-07-10 12:30:02</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">test</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"str\">kc_proklikano</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"float\">3033.5317</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"float\">18950.0861</td>\n",
       "            \n",
       "          \n",
       "            \n",
       "              <td class=\"float\">0.8701</td>\n",
       "            \n",
       "          \n",
       "      </tr>\n",
       "    \n",
       "  </tbody>\n",
       "</table>"
      ],
      "text/plain": [
       "    date time             set used   target                 mae          rmse   rsquared\n",
       "0   2022-07-10 12:29:15   train      kc_proklikano    2973.985     14783.8322     0.9394\n",
       "1   2022-07-10 12:30:02   test       kc_proklikano    3033.5317    18950.0861     0.8701"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pipe1.score(star_schema.test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.5 featuretools\n",
    "\n",
    "Unfortunately, featuretools 1.0.0 and 1.1.0 appear to contain a bug, which make it impossible to apply them to this dataset. For this reason, we report the results attained with featuretools 0.9."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.6 Features\n",
    "\n",
    "The most important feature looks as follows:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/markdown": [
       "```sql\n",
       "DROP TABLE IF EXISTS \"FEATURE_1_56\";\n",
       "\n",
       "CREATE TABLE \"FEATURE_1_56\" AS\n",
       "SELECT EWMA_1H( t2.\"kc_proklikano\" ORDER BY t1.\"month_year_datum_transakce\" - t2.\"month_year_datum_transakce, '+1.000000 days'\" ) AS \"feature_1_56\",\n",
       "       t1.rowid AS rownum\n",
       "FROM \"POPULATION__STAGING_TABLE_1\" t1\n",
       "INNER JOIN \"PROBEHNUTO__STAGING_TABLE_3\" t2\n",
       "ON t1.\"client_id\" = t2.\"client_id\"\n",
       "WHERE t2.\"month_year_datum_transakce, '+1.000000 days'\" <= t1.\"month_year_datum_transakce\"\n",
       "AND t1.\"sluzba\" = t2.\"sluzba\"\n",
       "GROUP BY t1.rowid;\n",
       "```"
      ],
      "text/plain": [
       "'DROP TABLE IF EXISTS \"FEATURE_1_56\";\\n\\nCREATE TABLE \"FEATURE_1_56\" AS\\nSELECT EWMA_1H( t2.\"kc_proklikano\" ORDER BY t1.\"month_year_datum_transakce\" - t2.\"month_year_datum_transakce, \\'+1.000000 days\\'\" ) AS \"feature_1_56\",\\n       t1.rowid AS rownum\\nFROM \"POPULATION__STAGING_TABLE_1\" t1\\nINNER JOIN \"PROBEHNUTO__STAGING_TABLE_3\" t2\\nON t1.\"client_id\" = t2.\"client_id\"\\nWHERE t2.\"month_year_datum_transakce, \\'+1.000000 days\\'\" <= t1.\"month_year_datum_transakce\"\\nAND t1.\"sluzba\" = t2.\"sluzba\"\\nGROUP BY t1.rowid;'"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pipe1.features.to_sql()[pipe1.features.sort(by=\"importances\")[0].name]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.8 Discussion\n",
    "\n",
    "For a more convenient overview, we summarize our results into a table.\n",
    "\n",
    "Name                 | R-squared  | RMSE   | MAE\n",
    "-------------------- | ---------- | -------| ----\n",
    "getML: FastProp      |     87.01% | 14,783 | 2,974\n",
    "featuretools         |     63.24% | 31,655 | 5,167"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. Conclusion\n",
    "\n",
    "We have benchmarked getML against featuretools on a dataset related to online transactions. We have found that getML outperforms featuretools by a wide margin."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## References\n",
    "\n",
    "Motl, Jan, and Oliver Schulte. \"The CTU prague relational learning repository.\" arXiv preprint arXiv:1511.03086 (2015)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Next Steps\n",
    "\n",
    "This tutorial benchmarked getML against academic state-of-the-art algorithms from relational learning literature and getML's qualities with respect to categorical data.\n",
    "\n",
    "If you are interested in further real-world applications of getML, head back to the [notebook overview](welcome.md) and choose one of the remaining examples.\n",
    "\n",
    "Here is some additional material from our [documentation](https://docs.getml.com/latest/) if you want to learn more about getML:\n",
    "* [Feature learning with Multirel](https://docs.getml.com/latest/user_guide/feature_engineering/feature_engineering.html#multirel)\n",
    "* [Feature learning with Relboost](https://docs.getml.com/latest/user_guide/feature_engineering/feature_engineering.html#relboost)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Get in contact\n",
    "\n",
    "If you have any question schedule a [call with Alex](https://go.getml.com/meetings/alexander-uhlig/getml-demo), the co-founder of getML, or write us an [email](team@getml.com). Prefer a private demo of getML? Just contact us to make an appointment."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " "
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "encoding": "# -*- coding: utf-8 -*-",
   "formats": "ipynb,py:percent,md"
  },
  "kernelspec": {
   "display_name": "Python 3.10.6 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "vscode": {
   "interpreter": {
    "hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
